<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/modules/oss/oss-config.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\..\index.html">All files</a> / <a href="index.html">src/views/modules/oss</a> oss-config.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/52</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/26</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/32</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/22</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134</td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;<span class="cstat-no" title="statement not covered" >t<span class="fstat-no" title="function not covered" >em</span>plate&gt;</span>
  &lt;el-dialog
    title="云存储配置"
<span class="cstat-no" title="statement not covered" >    :close-on-click-modal="false"</span>
    :visible.sync="visible"&gt;
    &lt;el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px"&gt;
      &lt;el-form-item size="mini" label="存储类型"&gt;
        &lt;el-radio-group v-model="dataForm.type"&gt;
          &lt;el-radio :label="1"&gt;七牛&lt;/el-radio&gt;
          &lt;el-radio :label="2"&gt;阿里云&lt;/el-radio&gt;
          &lt;el-radio :label="3"&gt;腾讯云&lt;/el-radio&gt;
        &lt;/el-radio-group&gt;
      &lt;/el-form-item&gt;
      &lt;template v-if="dataForm.type === 1"&gt;
        &lt;el-form-item size="mini"&gt;
          &lt;a href="http://www.renren.io/open/qiniu.html" target="_blank"&gt;免费申请(七牛)10GB储存空间&lt;/a&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="域名"&gt;
          &lt;el-input v-model="dataForm.qiniuDomain" placeholder="七牛绑定的域名"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="路径前缀"&gt;
          &lt;el-input v-model="dataForm.qiniuPrefix" placeholder="不设置默认为空"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="AccessKey"&gt;
          &lt;el-input v-model="dataForm.qiniuAccessKey" placeholder="七牛AccessKey"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="SecretKey"&gt;
          &lt;el-input v-model="dataForm.qiniuSecretKey" placeholder="七牛SecretKey"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="空间名"&gt;
          &lt;el-input v-model="dataForm.qiniuBucketName" placeholder="七牛存储空间名"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
      &lt;/template&gt;
      &lt;template v-else-if="dataForm.type === 2"&gt;
        &lt;el-form-item label="域名"&gt;
          &lt;el-input v-model="dataForm.aliyunDomain" placeholder="阿里云绑定的域名"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="路径前缀"&gt;
          &lt;el-input v-model="dataForm.aliyunPrefix" placeholder="不设置默认为空"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="EndPoint"&gt;
          &lt;el-input v-model="dataForm.aliyunEndPoint" placeholder="阿里云EndPoint"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="AccessKeyId"&gt;
          &lt;el-input v-model="dataForm.aliyunAccessKeyId" placeholder="阿里云AccessKeyId"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="AccessKeySecret"&gt;
          &lt;el-input v-model="dataForm.aliyunAccessKeySecret" placeholder="阿里云AccessKeySecret"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="BucketName"&gt;
          &lt;el-input v-model="dataForm.aliyunBucketName" placeholder="阿里云BucketName"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
      &lt;/template&gt;
      &lt;template v-else-if="dataForm.type === 3"&gt;
        &lt;el-form-item label="域名"&gt;
          &lt;el-input v-model="dataForm.qcloudDomain" placeholder="腾讯云绑定的域名"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="路径前缀"&gt;
          &lt;el-input v-model="dataForm.qcloudPrefix" placeholder="不设置默认为空"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="AppId"&gt;
          &lt;el-input v-model="dataForm.qcloudAppId" placeholder="腾讯云AppId"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="SecretId"&gt;
          &lt;el-input v-model="dataForm.qcloudSecretId" placeholder="腾讯云SecretId"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="SecretKey"&gt;
          &lt;el-input v-model="dataForm.qcloudSecretKey" placeholder="腾讯云SecretKey"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="BucketName"&gt;
          &lt;el-input v-model="dataForm.qcloudBucketName" placeholder="腾讯云BucketName"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
        &lt;el-form-item label="Bucket所属地区"&gt;
          &lt;el-input v-model="dataForm.qcloudRegion" placeholder="如：sh（可选值 ，华南：gz 华北：tj 华东：sh）"&gt;&lt;/el-input&gt;
        &lt;/el-form-item&gt;
      &lt;/template&gt;
    &lt;/el-form&gt;
    &lt;span slot="footer" class="dialog-footer"&gt;
      &lt;el-button @click="visible = false"&gt;取消&lt;/el-button&gt;
      &lt;el-button type="primary" @click="dataFormSubmit()"&gt;确定&lt;/el-button&gt;
    &lt;/span&gt;
  &lt;/el-dialog&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  export default {
    data () {
      return {
        visible: false,
        dataForm: {},
        dataRule: {}
<span class="cstat-no" title="statement not covered" >      }</span>
    },<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >    methods: {</span>
      init (id) {
        this.visible = true
        this.$http({
          url: this.$http.adornUrl('/sys/oss/config'),
          method: 'get',
          params: this.$http.adornParams()
        }).then(({data}) =&gt; {
          this.data<span class="fstat-no" title="function not covered" >Form </span>= data &amp;&amp; data.code === 0 ? data.config : []
        })<span class="cstat-no" title="statement not covered" ></span>
      },
<span class="cstat-no" title="statement not covered" >      // 表单提交</span>
<span class="cstat-no" title="statement not covered" >      dataFormSubmit () {</span>
        this.$refs['dataForm'].validate((valid) =&gt; {
          if (valid) {
            this.$http({
<span class="fstat-no" title="function not covered" >              ur</span>l: this.$http.adornUrl('/sys/oss/saveConfig'),
              metho<span class="cstat-no" title="statement not covered" >d: 'post',</span>
              data: this.$http.adornData(this.dataForm)
<span class="cstat-no" title="statement not covered" >            }).then(({data}) =&gt; {</span>
              if (data &amp;&amp; data.code === 0) {
                this.$message({
                  message: '操作成功',
                  type: 'success',
                  duration: 1<span class="fstat-no" title="function not covered" >500,</span>
                  o<span class="cstat-no" title="statement not covered" >nClos</span>e: () =&gt; {
                    this.visible = false
<span class="cstat-no" title="statement not covered" >                  }<span class="fstat-no" title="function not covered" ></span></span>
<span class="cstat-no" title="statement not covered" >                })</span>
<span class="cstat-no" title="statement not covered" >              } else {</span>
                this.$message.error(data.msg)
              }
            })
          }<span class="fstat-no" title="function not covered" ></span>
        })<span class="cstat-no" title="statement not covered" ></span>
      }
    }<span class="cstat-no" title="statement not covered" ></span>
  }<span class="cstat-no" title="statement not covered" ></span>
&lt;/script&gt;
&nbsp;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Sep 20 2018 10:14:21 GMT+0800 (中国标准时间)
</div>
</div>
<script src="..\..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\..\sorter.js"></script>
</body>
</html>
